home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / bash / bash_110 / mint / bash110s.zoo / bash-1.10 / builtins / reserved.def < prev    next >
Encoding:
Text File  |  1991-08-19  |  2.6 KB  |  76 lines

  1. This file is reserved.def, in which the shell reserved words are defined.
  2. It has no direct C file production, but defines builtins for the help
  3. command.
  4.  
  5. Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
  6.  
  7. This file is part of GNU Bash, the Bourne Again SHell.
  8.  
  9. Bash is free software; you can redistribute it and/or modify it under
  10. the terms of the GNU General Public License as published by the Free
  11. Software Foundation; either version 1, or (at your option) any later
  12. version.
  13.  
  14. Bash is distributed in the hope that it will be useful, but WITHOUT ANY
  15. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17. for more details.
  18.  
  19. You should have received a copy of the GNU General Public License along
  20. with Bash; see the file COPYING.  If not, write to the Free Software
  21. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. $BUILTIN for
  24. $SHORT_DOC for NAME [in WORDS ... ;] do COMMANDS; done
  25. The `for' loop executes a sequence of commands for each member in a
  26. list of items.  If `in WORDS ...;' is not present, then `in "$@"' is
  27. assumed.  For each element in WORDS, NAME is set to that element, and
  28. the COMMANDS are executed.
  29. $END
  30.  
  31. $BUILTIN case
  32. $SHORT_DOC case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac
  33. Selectively execute COMMANDS based upon WORD matching PATTERN.  The
  34. `|' is used to separate multiple patterns.
  35. $END
  36.  
  37. $BUILTIN if
  38. $SHORT_DOC if COMMANDS; then COMMANDS; [else COMMANDS;] fi
  39. `if' executes the `then' COMMANDS only if the final command in the
  40. `if' COMMANDS has an exit status of zero.
  41. $END
  42.  
  43. $BUILTIN while
  44. $SHORT_DOC while COMMANDS; do COMMANDS; done
  45. Expand and execute COMMANDS as long as the final command in the
  46. `while' COMMANDS has an exit status of zero.
  47. $END
  48.  
  49. $BUILTIN until
  50. $SHORT_DOC until COMMANDS; do COMMANDS; done
  51. Expand and execute COMMANDS as long as the final command in the
  52. `until' COMMANDS has an exit status which is not zero.
  53. $END
  54.  
  55. $BUILTIN function
  56. $SHORT_DOC function NAME { COMMANDS ; } or NAME () { COMMANDS ; }
  57. Create a simple command invoked by NAME which runs COMMANDS.
  58. Arguments on the command line along with NAME are passed to the
  59. function as $0 .. $n.
  60. $END
  61.  
  62. $BUILTIN { ... }
  63. $SHORT_DOC { COMMANDS }
  64. Run a set of commands in a group.  This is one way to redirect an
  65. entire set of commands.
  66. $END
  67.  
  68. $BUILTIN %
  69. $SHORT_DOC %[DIGITS | WORD] [&]
  70. This is similar to the `fg' command.  Resume a stopped or background
  71. job.  If you specifiy DIGITS, then that job is used.  If you specify
  72. WORD, then the job whose name begins with WORD is used.  Following the
  73. job specification with a `&' places the job in the background.
  74. $END
  75.  
  76.